package pl;

import java.util.ArrayList;

import javax.swing.JTextArea;

import donnees.Contrainte;
import donnees.FonctionObj;
import donnees.Variable;
import enumerations.Type;
import exceptions.ContrainteException;
import exceptions.VariableException;

public interface ProblemeLineaire {
	
	public void createMaximize(ArrayList<Variable> vars, ArrayList<Double> coeffs) throws VariableException;
	public void createMinimize(ArrayList<Variable> vars, ArrayList<Double> coeffs) throws VariableException;
	public int addConstraintLE(String contr, double cste) throws VariableException, ContrainteException;
	public int addConstraintGE(String contr, double cste) throws VariableException, ContrainteException;
	public void addConstraintLE(int indice, String contr, double cste) throws ContrainteException, VariableException;
	public void addConstraintGE(int indice, String contr, double cste) throws ContrainteException, VariableException;
	public void setConstraintLE(int indice, String contr, double cste) throws ContrainteException, VariableException;
	public void setConstraintGE(int indice, String contr, double cste) throws ContrainteException, VariableException;
	public void removeConstraint(int indice) throws ContrainteException;
	public void addVariable(String nom, Type type) throws VariableException;
	public void removeVariable(String nom) throws VariableException;
	public Variable getVariable(String nom) throws VariableException;
	public ArrayList<Variable> getVariables();
	public Contrainte getConstraint(int indice) throws ContrainteException;
	public ArrayList<Contrainte> getConstraints();
	public FonctionObj getFonctionObj();
	public void setFonctionObj(boolean max, ArrayList<Variable> vars, ArrayList<Double> coeffs) throws VariableException;
	public void resoudre(JTextArea log);
}
